package com.agri.exception;

import com.agri.result.ResultCode;
import lombok.Getter;

/**
 * 基础异常类
 */
@Getter
public class BaseException extends RuntimeException {
    private final ResultCode code;

    public BaseException(ResultCode code) {
        super(code.getMessage());
        this.code = code;
    }

    public BaseException(ResultCode code, String message) {
        super(message);
        this.code = code;
    }
}